my_list = []
for i in range(10):
    my_list.append(i)
print(my_list)


# 等价于       可读性差
new_list = [x for x in range(10)]
print(new_list)

# 10遍0-i
a = [j for i in range(10) for j in range(i)]
print(a)

# 二维列表
b = [[col * row for col in range(5)] for row in range(5)]
print(b)
print(b[1][1])

# 二维转一维（excel表转一维）
c = [j for x in b for j in x]
print(c)
